<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script src="d3.js"></script>
    <script>
        const svg = d3.select('body').append('svg');
        svg.attr('width',800);
        svg.attr('height',500);
        svg.style('border','2px solid #ccc');
        
        const area = d3.area().x(d=>d.x).y0(0).y1(d=>d.y).curve(d3.curveCatmullRom);

        svg.append('path').attr('d',area([{x:10,y:100},{x:50,y:110},{x:130,y:90},{x:240,y:200},{x:350,y:150}])).attr('fill','none').attr('stroke','#666');
    </script>
</body>
</html>